<template>
  <div class="crumb">
    <template v-for="(item, index) in nav" :key="index">
      <a href="#" @click="router.push(item.path)">
        {{ item.name }}
      </a>
      <template v-if="index < nav.length - 1">/</template>
    </template>
  </div>
</template>

<script lang="ts" setup>
import { reactive, toRefs, ref } from "vue";
import { useRoute, useRouter } from "vue-router";
defineProps(["nav"]);

const route = useRoute();
const router = useRouter();
console.log(route);

// navS.value=route
</script>
<style lang="less" scoped>
.crumb {
  a {
    text-decoration: none;
    color: #666;
    line-height: 30px;
  }
}
</style>
